import { Store, getStore } from "@tauri-apps/plugin-store";
async function getAppStore() {
    return await Store.load("data.bin");
}

async function getQikeGroups() {
    const store = await getAppStore();
    let groups = await store.get("qikeGroups");
    let groupsp = [];
    groups.forEach((g) => {
      groupsp.push({
        text: g,
        value: g,
      });
    });
    if (groupsp.length == 0) {
      groupsp.push({ text: "默认", value: "默认" });
    }
    return groupsp;
}

export { getAppStore, getQikeGroups };